Dreamweaver Article

Implementing User Authentication


Jeffrey Bardzell

Jeffrey Bardzell

www.allectomedia.com
ittraining.iu.edu

Table of Contents

  1. Introduction
  2. Setting Up The Site
  3. User Authentication as a Web Application
  4. Introducing Sessions and Session Variables
  5. Implementing Registration
  6. Implementing Log-on
  7. Enabling Sessions With Application.cfm (ColdFusion Only)
  8. Restricting Access to Pages
  9. Implementing Log Out

This article covers just a small portion of the Dreamweaver MX 2004: Website Development instructor-led course. If you like what you see and want to get the full experience, find a Macromedia Authorized Training Partner near you. Only at a Macromedia Authorized Training location will you learn from instructors thoroughly trained and certified by Macromedia.

Or if you prefer to learn on your own, check out Macromedia Dreamweaver MX 2004 with ASP, ColdFusion, and PHP: Training From the Source (Macromedia Press), by Jeffrey Bardzell.

Note: ASP.NET users can learn how to implement user authentication with Heidi Baustista’s Implementing Form-Based Authentication article.

Implementing a framework that allows users to register and log in is one of the most common tasks for web developers. Pages in the site are divided into those that are publicly accessible and those that require users to log in. A set of registration and log-in pages allow users to get through the barriers and access pages requiring authentication. Creating a user authentication framework is the centerpiece of this tutorial. Thanks to a series of Dreamweaver server behaviors, creating an authentication framework is much easier than you might think.

In this tutorial, you'll create a complete registration and log-on system, taking into account both when things go right and when they go awry (for example, log-on fails or a username is already in use). You will work on eight pages, five of which are specifically related to registration and log-on, two of which are protected, and the last one is simply an index page. Once you have a system like this set up, you can add as many restricted pages as you like. You can even implement roles-based authorization, in which users can access only certain pages in the site, even after they have logged in.

Requirements

To complete this tutorial you must fulfill the following prerequisites and install software and sample files:

  • Dreamweaver MX 2004


  • You are comfortable with Dreamweaver and its interface

    • You have access to a web server capable of running ASP, ColdFusion, or PHP pages
    • You have the knowledge and permission to configure a dynamic site, including creating your own data sources and the configuration of the included site files
    • You have learned basic concepts and techniques for developing ASP, ColdFusion, or PHP pages (though you certainly need not be an expert in one of these areas)
  • Tutorials and sample files:



About the author

Jeffrey Bardzell is an IT trainer, curriculum developer, and multimedia instructional designer in the IT Training and Education (http://ittraining.iu.edu/) department within University Information Technology Services at Indiana University, where he is also A.B.D. in Comparative Literature.

He has authored numerous computer books, including Macromedia MX eLearning: Advanced Training From the Source (Macromedia Press); Special Edition Using Fireworks MX (Que); Macromedia Dreamweaver MX Dynamic Applications: Advanced Training From the Source (Macromedia Press); Studio MX 2004: Training From the Source (Macromedia Press); Macromedia Dreamweaver MX 2004 with ASP, ColdFusion, and PHP: Training From the Source (Macromedia Press). He also co-authored Mastering Macromedia Contribute (Wiley & Sons) and Fireworks 4 Expert Edge (Osborne).

Jeffrey is also a co-founder of Phireworx (http://www.phireworx.com), and he is a regular participant in Macromedia forums.